# Maintainer: Willow Barraco <contact@willowbarraco.fr>
pkgname=splitter
pkgver=0.3.0
pkgrel=0
pkgdesc="A speedrunning GUI"
url="https://sr.ht/~stacyharper/splitter/"
# hare-cairo & hare-xkb currently doesn't build on riscv64
arch="x86_64 aarch64" # hare
license="AGPL-3.0-or-later"
makedepends="
	wayland-dev
	wayland-protocols
	libbsd-dev
	cairo-dev
	libxkbcommon-dev
	hare
	hari
	hare-ev
	hare-wayland
	hare-cairo
	hare-xkb
	scdoc
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~stacyharper/splitter/archive/$pkgver.tar.gz"

# Work-around of https://todo.sr.ht/~sircmpwn/hare/723#event-261138
case "$CARCH" in
	aarch64)
		export LDFLAGS="-no-pie $LDFLAGS"
		;;
esac

build() {
	make -j1 PREFIX=/usr
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" PREFIX="/usr" install
}

sha512sums="
292dac14028fd90baa8106fdd8944fba987549479469521e88b5788fef15bfd28d4630138341f2786d3e74d5634804473ff2abe8a41fc3bc83c5369ba576a079  splitter-0.3.0.tar.gz
"
